<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>选择国际电话区号</title>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />

    <style>
        body {
            background-color: #fff;
        }

        .mainland {
            background: #e8e8e8;
        }

        .mainland,
        .kong {
            border-bottom: 1px solid #d2d2d2;
            padding: 7px 35px 7px 26px;
        }

        .eight-six {
            float: right;
        }
        .kong:first-child{
          border-top: 1px solid #9FA0A0;
          background-color: #e8e8e8;
        }
    </style>
</head>

<body>
    <div class="big-box" id="vm">
        <div class="kong" @click="getnubmer(item.number)" v-for="item in number">{{item.kong}}
             <div class="eight-six">+{{item.number}}</div>
         </div>
    </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/vue.2.5.js"></script>
<script type="text/javascript" src="../../script/faskclick.js"></script>
<script>
var vm = new Vue({
    el: '#vm',
    data: {
          number:[
            {kong:'中国大陆',number:'86'},
            {kong:'中国台湾地区',number:'00886'},
            {kong:'中国香港',number:'00852'},
            {kong:'中国澳门',number:'00853'},
            {kong:'马来西亚',number:'0060'},
            {kong:'新加坡',number:'0065'},
          ]
    },
    created: function() {
        var _this = this;
        apiready = function() {
            _this.init();
            api.parseTapmode();
            var header = $api.byId('aui-header');
            $api.fixStatusBar(header);
            if ('addEventListener' in document) {
                document.addEventListener('DOMContentLoaded', function() {
                    FastClick.attach(document.body);
                }, false);
            }
        }
    },
    methods: {
        init: function() {
            var _this = this;
        },
        getnubmer:function(ret) {
          $api.setStorage('guojianumber', 'ret');

          api.sendEvent({
              name: 'number',
              extra: {
                  number: ret
              }
          });
          api.closeWin();
        }
    }
})
</script>
</html>
